VERSION 5.00
Begin VB.Form SetSizeDlg 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "图像采集大小设置"
   ClientHeight    =   2445
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   4050
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2445
   ScaleWidth      =   4050
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox DispWidth 
      Height          =   375
      Left            =   1320
      TabIndex        =   2
      Top             =   1320
      Width           =   855
   End
   Begin VB.TextBox DispHeight 
      Height          =   375
      Left            =   1320
      TabIndex        =   3
      Top             =   1800
      Width           =   855
   End
   Begin VB.TextBox InWidth 
      Height          =   375
      Left            =   1320
      TabIndex        =   0
      Top             =   360
      Width           =   855
   End
   Begin VB.TextBox InHeight 
      Height          =   375
      Left            =   1320
      TabIndex        =   1
      Top             =   840
      Width           =   855
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "取消"
      Height          =   375
      Left            =   2880
      TabIndex        =   5
      Top             =   1440
      Width           =   855
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "确定"
      Height          =   375
      Left            =   2880
      TabIndex        =   4
      Top             =   360
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "显示宽度："
      Height          =   255
      Left            =   240
      TabIndex        =   9
      Top             =   1440
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "显示高度："
      Height          =   255
      Left            =   240
      TabIndex        =   8
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "采集宽度："
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   480
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "采集高度："
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   960
      Width           =   975
   End
End
Attribute VB_Name = "SetSizeDlg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim res As Boolean
Dim gInWidth   As Long
Dim gInHeight  As Long
Dim gDispWidth As Long
Dim gDispHeight As Long
Option Explicit

Private Sub CancelButton_Click()
Unload Me
End Sub

Private Sub Form_Initialize()
gInWidth = 768
gInHeight = 576
gDispWidth = 768
gDispHeight = 576
End Sub

Private Sub Form_Load()
InWidth.Text = gInWidth
InHeight.Text = gInHeight
DispWidth.Text = gDispWidth
DispHeight.Text = gDispHeight
End Sub

Private Sub OKButton_Click()
res = Form1.MVDEVICE1.SetCaptureSample(0, InWidth.Text, InHeight.Text)
res = Form1.MVDEVICE1.SetVideoSample(0, DispWidth.Text, DispHeight.Text)
Form1.MVDEVICE1.SetDispWindow 0, 0, 0, DispHeight.Text, DispWidth.Text
gInWidth = InWidth.Text
gInHeight = InHeight.Text
gDispWidth = DispWidth.Text
gDispHeight = DispHeight.Text
Form1.Refresh
Unload Me
End Sub
